import Qt 4.7
import ApplicationStarter 1.0

Rectangle {
    id: root
    width: 864
    height: 480
    Starter {
        id: starter
    }
    Rectangle {        
        anchors.centerIn: parent
        rotation: -90
        width: 480
        height: 864
        color: "#05264A"
        smooth: true

        //Spinner
        AnimatedImage {
            paused: !starter.starting
            visible: starter.starting
            anchors.centerIn: parent
            source: "images/spinner_100.gif"
        }

        //List of applications
        ListView {
            id:list

            enabled: !starter.starting
            opacity: starter.starting?0:1

            anchors {
                top: parent.top
                topMargin: 10

                bottom: parent.bottom
                bottomMargin: 10

                horizontalCenter: parent.horizontalCenter
            }

            width: 450
            spacing: 10
            model: ApplicationModel {}
            delegate: ApplicationDelegate {
                id: listDelegate
            }

            //Animate opacity change
            Behavior on opacity {
                NumberAnimation {
                    duration: 400
                }
            }
        }
    }
}
